import React from 'react';
import {Card, Button, message } from 'antd';

export default class Messages extends React.Component{
    showMessage = (type) => {
      message[type]('Hello,Lao铁', 2)
    };
    render() {
        return (
            <div className="wrap">
                <Card title="全局提示框" className="wrap">
                    <Button type="primary" onClick={() => this.showMessage('success')}>Success</Button>
                    <Button onClick={() => this.showMessage('info')}>Info</Button>
                    <Button onClick={() => this.showMessage('warning')}>Warning</Button>
                    <Button onClick={() => this.showMessage('error')}>Error</Button>
                    <Button onClick={() => this.showMessage('loading')}>Loading</Button>
                </Card>
            </div>
        )
    }
}
